<include file="Public/header"/>
<!--main start=============主体-->
<div class="container" style="margin-top: 0">
<div class="row">
	<empty name="user">
		<div class="col-xs-3 col-home-210 col-home-960-user-dashboard" style="float: right;">
			<div class="panel panel-simple panel-simple-border panel-user-dashboard js-login-panel" style="line-height: 41px;">
				<div class="panel-heading">用户登录</div>
				<div class="panel-body">
					<form role="form" method="post" action="{:U('Home/Login/dologin')}" id="ajaxForm">
						<div class="form-group">
							<label for="username">帐号</label>
							<input type="text" class="form-control" id="name" name="username" placeholder="登录帐号"></div>
						<div class="form-group">
							<label for="password">密码</label>
							<input type="password" class="form-control" id="pass" name="password" placeholder="登录密码"></div>
						<div class="checkbox">
							<label><input type="checkbox" name="auto_login" value="1" checked="checked"/>&nbsp;下次自动登录</label>
						</div>
						<button type="submit" class="btn btn-block btn-primary js-btn-login">登录</button>
					</form>
					<div class="text-block text-right"><a href="{:U('Home/Register/index')}">免费注册</a></div>

				</div>
			</div>
		</div>
		<else/>

		<if condition="$usertype eq 1 "><!--个人帐户-->
			<div class="col-xs-3 col-home-210 col-home-960-user-dashboard" style="float: right;">
				<div class="panel panel-simple panel-simple-border panel-user-dashboard">
					<div class="panel-heading">用户信息</div>
					<div class="panel-body">
						<div class="user-face center-block text-center" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="账号设置">
							<a href="{:U('User/Resume/index')}" target="_blank"><img class="img-border" src="{$userphoto}"></a></div>
						<label class="text-block text-center" data-toggle="tooltip" data-placement="bottom" title="账号设置" style="margin: 10px 0px;"><a class="text-primary" href="{:U('User/Resume/index')}" target="_blank">{$user['alias']}</a></label>

						<div class="dashboard-menu-list"><a class="dashboard-menu js-btn-resume" href="{:U('User/Resume/index')}" target="_blank"><i class="fa fa-2x fa-file-word-o"></i><span class="dashboard-menu-title">我的简历</span></a><a class="dashboard-menu js-btn-history" href="{:U('User/History/index')}" target="_blank"><i
								class="fa fa-2x fa-history"></i><span class="dashboard-menu-title">申请历史</span></a><a class="dashboard-menu js-btn-favorite" href="{:U('User/Favorite/index')}" target="_blank"><i class="fa fa-2x fa-star-o"></i><span class="dashboard-menu-title">我的收藏</span></a><a
								class="dashboard-menu js-btn-subscribe" href="{:U('/User/PersonalSet/index')}" target="_blank"><i class="fa fa-2x fa-user"></i><span class="dashboard-menu-title">账号设置</span></a></div>
					</div>
				</div>
			</div>

			<elseif condition="$usertype eq 2"/><!--企业用户-->
			<div class="col-xs-3 col-home-210 col-home-960-user-dashboard" style="float: right;">
				<div class="panel panel-simple panel-simple-border panel-user-dashboard">
					<div class="panel-heading">用户信息</div>
					<div class="panel-body">
						<div class="wei-user-logo center-block" data-toggle="tooltip" data-placement="bottom" title="企业主页">
							<style>
								.user-face, .user-face img, .wei-user-logo, .wei-user-logo img {
									width: 108px;
									height: 108px;
								}
								.wei-user-logo {
									border: 1px solid #fff;
								}
							</style>
							<a href="{:U('User/AccountSet/index')}" target="_blank"><img class="img-border" src="{$company.logo}"></a></div>
						<label class="text-block text-center" data-toggle="tooltip" data-placement="bottom" title="企业主页" style="margin: 10px 0px;"><a class="text-primary" href="{:U('User/AccountSet/index')}" target="_blank">{$company['cname']}</a></label>

						<div class="dashboard-menu-list"><a class="dashboard-menu js-btn-job-list" href="{:U('User/Job/index')}" target="_blank"><i class="fa fa-2x fa-list"></i><span class="dashboard-menu-title">职位管理</span></a><a class="dashboard-menu notifier-number" href="{:U('User/Apply/index')}" target="_blank"
						                                                                                                                                                                                                    data-notifier-number="0"><i class="fa fa-2x fa-files-o"></i>
							<span class="dashboard-menu-title">简历管理</span>
						</a>
							<a class="dashboard-menu js-btn-comment-list" href="{:U('User/AccountSet/index')}" target="_blank"><i class="fa fa-2x fa-gears"></i><span class="dashboard-menu-title">帐号设置</span></a><a class="dashboard-menu notifier notifier-lg"
						                                                                                                                                                                                                                                     href="{:U('User/company/index')}" target="_blank"><i
								class="fa fa-2x fa-user"></i><span class="dashboard-menu-title">企业资料</span></a></div>
					</div>
				</div>
			</div>
		</if>
	</empty>
	<div class="job-category-widget " style="margin-top: 10px;">

		<div class="col-xs-9 col-home-960 col-home-960-banner" style="float: right;padding-left: 0px;width: 730px;margin-top: 0px;">
			<div class="banner-home   ">
				<div class=" carousel slide" data-ride="carousel" id="carousel-generic">
					<ol class="carousel-indicators">
						<li data-target="#carousel-generic" data-slide-to="0" class="active"></li>
						<li data-target="#carousel-generic" data-slide-to="1"></li>
						<li data-target="#carousel-generic" data-slide-to="2"></li>
						<li data-target="#carousel-generic" data-slide-to="3"></li>
						<li data-target="#carousel-generic" data-slide-to="4"></li>
						<li data-target="#carousel-generic" data-slide-to="5"></li>
					</ol>
					<!-- Wrapper for slides -->
					<div class="carousel-inner" role="listbox">
						<foreach name="pic" item="v" key="k">
							<div class="item <eq name='k' value='0'>active</eq>">
								<a href="{:U('Home/News/info?id='.$v['id'])}" target="_blank"><img src="{:titleImgPath($v['id'])}" alt="{$v.title}"></a>
							</div>
						</foreach>
					</div>
					<!-- Controls -->
					<a class="left carousel-control" href="#carousel-generic" role="button" data-slide="prev">
						<span class="glyphicon glyphicon-chevron-left"></span>
						<span class="sr-only">Previous</span>
					</a>
					<a class="right carousel-control" href="#carousel-generic" role="button" data-slide="next">
						<span class="glyphicon glyphicon-chevron-right"></span>
						<span class="sr-only">Next</span>
					</a>
				</div>
			</div>
			<ul class="sub-banner-home" style="margin-top: 20px;">
				<li>
					<a target="_blank">
						<img src="__PUBLIC__/images/sub_ban1" alt=""/>
					</a>
				</li>
				<li>
					<a target="_blank">
						<img src="__PUBLIC__/images/sub_ban2" alt=""/>
					</a>
				</li>
				<li>
					<a  target="_blank">
						<img src="__PUBLIC__/images/sub_ban3" alt=""/>
					</a>
				</li>
			</ul>
		</div>
		<include file="category"/>
	</div>
</div>
<div class="row">
	<style>
		.job-list li { border-bottom: none; padding: 0px 20px; }
	</style>
	<div class="col-xs-9 col-home-960">

		<div class="panel panel-with-tabs">
			<div class="panel-heading"><span class="panel-title">最新职位</span>
				<ul class="panel-tab-list">
					<li class="panel-tab-item js-tab-item active"><a class="js-city-switch" data-city-id="0" href="javascript:;">全部</a></li>
					<li class="panel-tab-item js-tab-item"><a class="js-city-switch" data-city-id="36" href="javascript:;">北京</a></li>
					<li class="panel-tab-item js-tab-item"><a class="js-city-switch" data-city-id="37" href="javascript:;">上海</a></li>
					<li class="panel-tab-item js-tab-item"><a class="js-city-switch" data-city-id="38" href="javascript:;">广州</a></li>
					<li class="panel-tab-item js-tab-item"><a class="js-city-switch" data-city-id="39" href="javascript:;">深圳</a></li>
					<li class="panel-tab-item js-tab-item"><a class="js-city-switch" data-city-id="40" href="javascript:;">杭州</a></li>
				</ul>
			</div>
			<script type="text/javascript">
				seajs.use(['$', 'bootbox'], function ($) {
					//根据城市加载职位列表
					$("a[class='js-city-switch']").click(function () {
						$(this).parent().addClass("active").siblings().removeClass('active');
						$("div.js-loading").removeClass('hidden');
						//获取属性中的值
						var cityid = $(this).attr("data-city-id");
						$.ajax({
							type : "get",
							url : "{:U('city')}",
							dataType : "json",
							data : {'cityid' : cityid},//根据城市ID值来返回相应的数据
							async : true,
							success : function (data) {
								//alert(data);
								$("div.js-loading").addClass("hidden");
								$("#js-job-list-0").empty();
								var str = "";
								for (var i = 0; i < data.length; i++) {
									//拼接数据字串
									str += "<li class=\"job-item\">" +
									"<div class=\"pull-right text-right\">" +
									"<span class=\"text-muted job-item-description\">" + data[i].edittime +
									"</span>" +
									"<strong class=\"job-item-salary text-highlight\">￥" + data[i].payid + "</strong>" +
									"</div>" +
									"<div class=\"pull-left wei-user-logo-small\">" +
									"<a title=\"" + data[i].title + "\" target=\"_blank\" href=\"{:U(\'Job/item\')}?jobid=" + data[i].id + "\">" +
									"<img class=\"img-border\" alt=\"logo\" src=\"" + data[i].logo + "\"/>" +
									"</a>" +
									"</div>" +
									"<div class=\"job-item-title\">" +
									"<a title=\"" + data[i].title + "\" target=\"_blank\" href=\"{:U(\'Job/item\')}?jobid=" + data[i].id + "\">" + data[i].title + "</a>" +
									"<i class=\"jobtong-icon-hot\" title=\"" + data[i].title + "\" data-placement=\"bottom\" data-toggle=\"tooltip\"></i>" +
									"<span class=\"text-label small\">" +
									"<a target=\"_blank\" href=\"{:U(\'Job/item\')}?jobid=" + data[i].id + "#comment_list\"><i class=\"fa fa-comments-o\"></i>&nbsp;" + data[i].flushnum + "</a>" +
									"</span>" +
									"</div>" +
									"<ul class=\"job-item-description list-inline\">" +
									"<li class=\"text-muted\">[<a target=\"_blank\" href=\"{:U(\'Job/item\')}?jobid=" + data[i].id + "\">" + data[i].name + "</a>]</li>" +
									"<li class=\"text-label\"><a target=\"_blank\" href=\"{:U(\'Job/item\')}?jobid=" + data[i].id + "\" title=\"" + data[i].cid + "\">" + data[i].cid + "</a></li>" +
									"<li class=\"text-label\">" + data[i].cityid + "</li>" +
									"<li class=\"text-label\">" + data[i].year + "工作经验</li>" +
									"<li class=\"text-label\">" + data[i].eid + "</li>" +
									"</ul>" +
									"</li>";

								}
								$("#js-job-list-0").append(str);//将数据添加到指定位置
							}
						});//ajax结束
					});

					//js结束
				});
			</script>
			<div class="panel-body">
				<!-- 需要哪个调用用哪个ul，就在后面加 style="display:block;" -->
				<ul id="js-job-list-0" class="job-list js-job-list" style="display:block;">
					<!-- 显示职位列表 -->
					<foreach name="hotjob" item="vo">
						<li class="job-item">
							<div class="pull-right text-right">
						<span class="text-muted job-item-description">{$vo.edittime}
						</span>
								<strong class="job-item-salary text-highlight">￥{$vo.payid}</strong>
							</div>
							<div class="pull-left wei-user-logo-small">
								<a title="{$vo.title}" target="_blank" href="{:U('Job/item')}?jobid={$vo.id}">
									<img class="img-border" alt="logo" src="{$vo.logo}"/>
								</a>
							</div>
							<div class="job-item-title">
								<a class="" title="{$vo.title}" target="_blank" href="{:U('Job/item')}?jobid={$vo.id}">{$vo.title}</a>
								<i class="jobtong-icon-hot" title="{$vo.title}" data-placement="bottom" data-toggle="tooltip"></i>
                                <span class="text-label small">
                                    <a target="_blank" href="{:U('Job/item')}?jobid={$vo.id}#comment_list"><i class="fa fa-comments-o"></i>&nbsp;{$vo.flushnum}</a><!--临时将刷新次数次字段做为评论次数使用-->
                                </span>
							</div>
							<ul class="job-item-description list-inline">
								<li class="text-muted">[<a target="_blank" href="{:U('Job/item')}?jobid={$vo.id}">{$vo.name}</a>]</li>
								<li class="text-label"><a target="_blank" href="{:U('Job/item')}?jobid={$vo.id}" title="{$vo.cid}">{$vo.cid}</a></li>
								<li class="text-label">{$vo.cityid}</li>
								<li class="text-label">{$vo.year}工作经验</li>
								<li class="text-label">{$vo.eid}</li>
							</ul>
						</li>
					</foreach>
				</ul>

				<div id="js-job-list-11" class="text-center js-loading hidden" style="padding: 50px 0 200px;">
					<i class="fa fa-spin"><img src="__PUBLIC__/images/loading.gif" width="40"/></i>&nbsp;
					<span class="text-primary">加载中...</span>
				</div>

			</div>
			<div class="panel-footer" style="padding: 20px;"><a href="{:U('Job/index')}">更多...</a></div>
		</div>
	</div>
	<!--右侧-->
	<div class="col-xs-3 col-home-210">
		<div class="panel panel-simple panel-hot-wei-user">
			<div class="panel-heading"><h4 style="height: 35px; line-height: 35px;border-bottom: 1px solid #cccccc;">热招企业</h4></div>
			<div class="panel-body">
				<ul class="list-inline">
					<foreach name="hotcompany" item="vo">
						<li>
							<a href="{:U('Company/item')}?comid={$vo.id}" target="_blank">
								<img class="img-border" src="{$vo.logo}" alt="{$vo.cname}" width="90" height="90" data-toggle="tooltip" data-placement="bottom" title="{$vo.cname}"/>
							</a>
						</li>
					</foreach>
				</ul>
			</div>
		</div>
	</div>

</div>
</div>
<script>
	seajs.use(['$', 'bootstrap3.0'], function ($) {
		$('.carousel').carousel()
	})
</script>
<!--main end=============主体-->
<include file="Public/footer"/>